//
//  NRWCarChoosePictureCell.m
//  New_Runway
//
//  Created by 张记 on 2018/5/29.
//  Copyright © 2018年 NelsonJ. All rights reserved.
//

#import "NRWCarChoosePictureCell.h"

@interface NRWCarChoosePictureCell ()


@end

@implementation NRWCarChoosePictureCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(void)setIndex:(NSIndexPath *)index{
    _index = index;
}
- (void)setImageModel:(NRWCarSharePictureModel *)imageModel{
    self.mainImage.image = imageModel.picture;
    if (imageModel.isSelected == YES) {
        [self.chooseBtn setImage:[UIImage imageNamed:@"share_selected_yes"] forState:UIControlStateNormal];
    }else{
        [self.chooseBtn setImage:[UIImage imageNamed:@"share_selected_no"] forState:UIControlStateNormal];
    }
}
- (IBAction)chooseThisImage:(UIButton *)sender {
//    sender.selected = !sender.selected;
 
    [self routerEventWithName:@"choose" userInfo:@{@"index" : self.index}];

}

@end
